<html>
<head>
<%@ include file="../includes/comun.jsp"%>
<style>
	.monto {width: 100%; text-align: right;}
	.td0101 {width: 23%}
	.td0102 {width: 7%; text-align: center;}
	.td0201 {width: 23%}
	.td0202 {width: 11%; text-align: center;}
	.td0203 {width: 11%; text-align: center; padding-left: 0px !important; border-collapse: none;}
	.th0301 {width: 30%} .th0302 {width: 70%;}}
	.td0301 {width: 30%} .td0302 {width: 70%; padding-left: 0px !important; border-collapse: none;}
	.th0401 {width: 30%} .th0402 {width: 65%;} .th0403 {width: 5%; text-align: center;}
	.td0401 {width: 30%} .td0402 {width: 65%;} .td0403 {width: 5%; text-align: center;}
</style>
<script language="javascript" src="<%=request.getContextPath()%>/js/administracion/InicioAplicacion.js"></script>
</head>
<body>
<table class="tblTitulo"><tr><td>Inicio de Aplicaci&oacute;n</td></tr></table>

<form name="frmInicio" id="frmInicio" method="post" action="<%=request.getContextPath()%>/confirmacioningreso.do?method=confirmarIngreso">
<table width="100%" align="center">
	<tr>
		<td valign="top">
			<div id="detalle">
			<table align="center" cellspacing="2" class="table3" width="100%" cellpadding="0">
				<tr>
					<td colspan="8" class="cuadrotitle">I. Configuracion de Transacciones</td>
				</tr>
				<tr>
					<td>
						<table align="center" cellspacing="2" class="tblListado" cellpadding="0">
							<tr>
								<th>Transacci&oacute;n</th>
								<th>Habilitar</th>
								<th>Afecta Saldo Disponible</th>
								<th>Visualiza Saldo Disponible</th>
								<th>Visualiza Saldo Contable</th>
								<th>Transacciones Significativas</th>
								<th>L&iacute;mite con Autorizaci&oacute;n</th>
								<th>Enviar transaccion a Host</th>
								<th>Consulta Reniec Obligatorio</th>
								<th>Validar Saldo Disponible limite autorizado</th>
								<th>CTAS Restringidas banca mayorista propietaria</th>
							</tr>
							<c:forEach items="${datos.transacciones}" var="tran">
							<tr>
								<td class="td0101 noeditable">${tran.descripciontransaccion}</td>
								<td class="td0102"><input type="checkbox" class="editable habilitar" value="1" name="tc_${tran.codigotransaccion}_1" <c:if test="${tran.flaghabilitar==1}">checked</c:if>/></td>
								<td class="td0102"><input type="checkbox" class="editable"        value="1" name="tc_${tran.codigotransaccion}_2"  <c:if test="${tran.flagafectasaldo==1}">checked</c:if>      <c:if test="${not tran.flagafectasaldoValido}">style='visibility:hidden'</c:if>/></td>
								<td class="td0102"><input type="checkbox" class="editable"        value="1" name="tc_${tran.codigotransaccion}_3"  <c:if test="${tran.flagsaldodisponible==1}">checked</c:if>  <c:if test="${not tran.flagsaldodisponibleValido}">style='visibility:hidden'</c:if>/></td>
								<td class="td0102"><input type="checkbox" class="editable"        value="1" name="tc_${tran.codigotransaccion}_4"  <c:if test="${tran.flagsaldocontable==1}">checked</c:if>    <c:if test="${not tran.flagsaldocontableValido}">style='visibility:hidden'</c:if>/></td>
								<td class="td0102"><input type="checkbox" class="editable signif" value="1" name="tc_${tran.codigotransaccion}_5"  <c:if test="${tran.flagsignificativo==1}">checked</c:if>    <c:if test="${not tran.flagsignificativoValido}">style='visibility:hidden'</c:if>/></td>
								<td class="td0102"><input type="checkbox" class="editable limite" value="1" name="tc_${tran.codigotransaccion}_6"  <c:if test="${tran.flagautorizacion==1}">checked</c:if>     <c:if test="${not tran.flagautorizacionValido}">style='visibility:hidden'</c:if>/></td>
								<td class="td0102"><input type="checkbox" class="editable"        value="1" name="tc_${tran.codigotransaccion}_7"  <c:if test="${tran.flagenviarhost==1}">checked</c:if>       <c:if test="${not tran.flagenviarhostValido}">style='visibility:hidden'</c:if>/></td>
								<td class="td0102"><input type="checkbox" class="editable"        value="1" name="tc_${tran.codigotransaccion}_8"  <c:if test="${tran.flagreniec==1}">checked</c:if>           <c:if test="${not tran.flagreniecValido}">style='visibility:hidden'</c:if>/></td>
								<td class="td0102"><input type="checkbox" class="editable"        value="1" name="tc_${tran.codigotransaccion}_9"  <c:if test="${tran.flagvalidarsaldo==1}">checked</c:if>     <c:if test="${not tran.flagvalidarsaldoValido}">style='visibility:hidden'</c:if>/></td>
								<td class="td0102"><input type="checkbox" class="editable"        value="1" name="tc_${tran.codigotransaccion}_10" <c:if test="${tran.flagctasrestringidas==1}">checked</c:if> <c:if test="${not tran.flagctasrestringidasValido}">style='visibility:hidden'</c:if>/></td>
							</tr>
							</c:forEach>
						</table>
					</td>
				</tr>
				<tr>
					<td colspan="8" class="cuadrotitle">II. Tratamiento de L&iacute;mites</td>
				</tr>
				<tr>
					<td colspan="8">
						<table class="tblFormulario">
							<tr>
								<td class="etiqueta" colspan="1">Transacci&oacute;n</td>
								<td class="valor" style="width: 310px">
								<select name="selTransaccion" id="selTransaccion" style="width: 300px" onchange="cambiarFiltros()">
									<option value="">--TODOS--</option>
									<c:forEach items="${datos.transacciones}" var="tran">
										<option value="${tran.codigotransaccion}">${tran.descripciontransaccion}</option>
									</c:forEach>
								</select>
								</td>
								<td class="etiqueta">Segmentos</td>
								<td class="valor">
								<select name="selSegmento" id="selSegmento" style="width: 150px" onchange="cambiarFiltros()">
									<option value="">--TODOS--</option>
									<c:forEach items="${cache.segmentosCliente}" var="segm">
									<option value="${segm.codigoparametro}">${segm.descripcion}</option>
									</c:forEach>
								</select>
								</td>
							</tr>
							</table>
							<table class="tblListado" id="tblTransaccionSegmento">
							<tr>
								<th>Transacci&oacute;n</th>
								<th>Segmento</th>
								<th>Sin Autorizaci&oacute;n Soles</th>
								<th>Con Autorizaci&oacute;n Soles</th>
								<th>Sin Autorizaci&oacute;n Dolares</th>
								<th>Con Autorizaci&oacute;n Dolares</th>
								<th>Sin Autorizaci&oacute;n Euros</th>
								<th>Con Autorizaci&oacute;n Euros</th>
							</tr>
							<c:forEach items="${datos.transaccionesSegmento}" var="tranSegm">
							<tr id="tr_${tranSegm.id.codigotransaccion}_${tranSegm.id.codigosegmento}">
								<td class="td0201 noeditable">${tranSegm.transaccion.descripciontransaccion}</td>
								<td class="td0202 noeditable">${tranSegm.segmento.descripcion}</td>
								<td class="td0203"><input type="text" name="ts_${tranSegm.id.codigotransaccion}_${tranSegm.id.codigosegmento}_1_1" value="<fmt:formatNumber value="${tranSegm.montosinautorizacionsoles}" pattern="##########"/>"   class="monto editable"/></td>
								<td class="td0203"><input type="text" name="ts_${tranSegm.id.codigotransaccion}_${tranSegm.id.codigosegmento}_1_2" value="<fmt:formatNumber value="${tranSegm.montoconautorizacionsoles}" pattern="##########"/>"   class="monto editable"/></td>
								<td class="td0203"><input type="text" name="ts_${tranSegm.id.codigotransaccion}_${tranSegm.id.codigosegmento}_2_1" value="<fmt:formatNumber value="${tranSegm.montosinautorizaciondolares}" pattern="##########"/>" class="monto editable"/></td>
								<td class="td0203"><input type="text" name="ts_${tranSegm.id.codigotransaccion}_${tranSegm.id.codigosegmento}_2_2" value="<fmt:formatNumber value="${tranSegm.montoconautorizaciondolares}" pattern="##########"/>" class="monto editable"/></td>
								<td class="td0203"><input type="text" name="ts_${tranSegm.id.codigotransaccion}_${tranSegm.id.codigosegmento}_3_1" value="<fmt:formatNumber value="${tranSegm.montosinautorizacioneuros}" pattern="##########"/>"   class="monto editable"/></td>
								<td class="td0203"><input type="text" name="ts_${tranSegm.id.codigotransaccion}_${tranSegm.id.codigosegmento}_3_2" value="<fmt:formatNumber value="${tranSegm.montoconautorizacioneuros}" pattern="##########"/>"   class="monto editable"/></td>
							</tr>
							</c:forEach>
						</table>
					</td>
				</tr>
				<tr>
					<td colspan="8" class="cuadrotitle">III. Monto Transacciones Significativas</td>
				</tr>
				<tr>
					<td colspan="8">
						<div style="width: 400px">
						<table class="tblListado" id="tblDivisas">
							<tr>
								<th class="th0301">Moneda</th>
								<th class="th0302">Monto Transacci&oacute;n Significativa</th>
							</tr>
							<c:forEach items="${datos.divisas}" var="divi">
							<tr>
								<td class="td0301 noeditable">${divi.descripcion}</td>
								<td class="td0302"><input type="text" name="di_${divi.codigoparametro}" value="<fmt:formatNumber value="${divi.valornumerico}" pattern="##########"/>" class="monto editable divisa"/></td>
							</tr>
							</c:forEach>
						</table>
						</div>
					</td>
				</tr>
				<tr>
					<td colspan="8" class="cuadrotitle">IV. Centros Especiales</td>
				</tr>
				<tr>
					<td colspan="8">
						<table class="tblFormulario">
							<tr><td class="etiqueta" style="width:170px !important;">Agregar Centro de Costo:</td>
								<td class="valor">
									<input type="hidden" id="centroCostoId"/>
									<input type="text" id="centroCosto" style="width: 300px"/>
								</td>
							</tr>
						</table>
						<table class="tblListado" id="tblCentrosProtegidos">				
							<tr>
								<th class="th0401">C&oacute;digo</th>
								<th class="th0402">Centro</th>
								<th class="th0403">&nbsp;</th>
							</tr>
							<c:forEach items="${datos.centrosCostoProtegido}" var="cent">
							<tr>
								<td class="td0401 noeditable">${cent.centroCosto.id}</td>
								<td class="td0402 noeditable">${cent.centroCosto.nombre}</td>
								<td class="td0403"><a href="javascript:eliminarCentroCosto(${cent.centroCosto.id})"><img src='images/icon_delete.png'></a></td>
							</tr>
							</c:forEach>
						</table>
					</td>
				</tr>
				<tr>
					<td colspan="8" class="cuadrotitle">V. Habilitacion por Extorno</td>
				</tr>
				<tr>
					<td colspan="8" width="90%">
						<table class="tblFormulario">
							<tr><td class="etiqueta" style="width:170px !important;">Agregar Perfil:</td>
								<td class="valor">
									<input type="hidden" id="perfilId"/>
									<input type="text" id="perfilFiltro" style="width: 300px"/>
								</td>
							</tr>
						</table>
						<table class="tblListado" id="tblPerfiles">
							<tr>
								<th class="th0401">C&oacute;digo</th>
								<th class="th0402">Perfil</th>
								<th class="th0403">&nbsp;</th>
							</tr>
							<c:forEach items="${datos.transaccionesPerfil}" var="tranPerf">
							<tr>
								<td class="td0401 noeditable">${tranPerf.perfil.codigoperfil}</td>
								<td class="td0402 noeditable">${tranPerf.perfil.descripcionperfil}</td>
								<td class="td0403"><a href="javascript:eliminarPerfil(${tranPerf.perfil.codigoperfil})"><img src='images/icon_delete.png'></a></td>
							</tr>
							</c:forEach>
						</table>
					</td>
				</tr>
			</table>
		</div>
	</td>
</tr>
<tr height="24px">
	<td align="center" >
		<div id="botonera">
			<input type="button" id="" value="Limpiar"   onClick="javascript:...;" class="boton" style="display: none"/>
			<input type="button" id="btnGrabar"    value="Grabar"    onClick="javascript:grabar();"    class="boton"/>
			<input type="button" id="btnIniciar"   value="Iniciar"   class="boton" <c:if test="${    cache.sistemaActivado}">style="display:none"</c:if>/>
			<input type="button" id="btnFinalizar" value="Finalizar" class="boton" <c:if test="${not cache.sistemaActivado}">style="display:none"</c:if>/>
		</div>
	</td>
</tr>
</table>
</form>
<table id="tblCentros" style="display: none;"></table>
</body>
</html>